#{extends 'main.html' /}
#{set title:'Create Course' /}

 
<h1> Create Course </h1>

<form id ="form" action="@{Application.createCourse()}" method="POST">
    <table border="0">
    <tbody>
    <tr><td>Name</td> 
    <td><input type="text" name="name" value="" required ="required"/>*</td>
    </tr>
    <tr><td>Description </td><td><textarea rows=5 cols=25 name="description" required ="required"></textarea>*</td></tr>
    <tr><td>Price </td><td> <input type="text" name="price" required ="required"/> For Basic : per class , For Trinity : per package </td></tr>
    <tr><td>Level</td>
    <td> <input type="text" name="level" required ="required"/>*	
    </td></tr>
    <tr><td>Type </td>
    <td><select size="1" name="type" required ="required"> 
    		<option value="1">Basic</option>
    		<option value="2">Trinity</option>
    		
    	</select> </td></tr>
    <tr><td>Activity</td>
    <td><select size="1" name="activity_id" id = "s_id" required="required"> 
                <option value="">--</option>
            #{list items:models.Activity.findAll(), as:'a'}
                <option value="${a.id}">${a.name}</option>
                #{/list}
           </select>
    </tbody>
    </table>
    <br>
    <input type="submit" value="Create"/>
    
</form>
   

   
    